import {
  App
} from '@tinyhttp/app'


const app = new App({
  onError: (err, req, res) => {
    res.status(err.code ? err.code : 500).send({
      message: err.code === 404 ? 'Not Found' : err.message || '服务器内部错误',
    })
  },
})

export default app;